<template>
  <a-layout id="components-layout-demo-custom-trigger">
    <a-layout-sider
      :trigger="null"
      collapsible
      v-model="collapsed"
    >
      <div class="logo" />
      <a-menu theme="dark" mode="inline" :defaultSelectedKeys="['5']">
        <a-sub-menu key="sub1">
            <span slot="title"><a-icon type="user" /><span>预留栏</span></span>
            <a-menu-item key="1">预留栏</a-menu-item>
            <a-menu-item key="2">预留栏</a-menu-item>
        </a-sub-menu>
        <a-sub-menu key="sub3">
            <span slot="title"><a-icon type="user" /><span>个人页</span></span>
            <a-menu-item key="5"><router-link to="/account/settings/base">个人中心</router-link></a-menu-item>
            <a-menu-item key="6">账户设置</a-menu-item>
        </a-sub-menu>
        <a-sub-menu key="sub2">
            <span slot="title"><a-icon type="setting" /><span>团队管理</span></span>
            <a-menu-item key="3"><router-link to="/team/members">团队成员</router-link></a-menu-item>
            <a-menu-item key="7"><router-link to="/team/roles">团队角色</router-link></a-menu-item>
            <a-menu-item key="4"><router-link to="/team/groups">团队群组</router-link></a-menu-item>
        </a-sub-menu>
        <a-sub-menu key="sub4">
            <span slot="title"><a-icon type="setting" /><span>组织管理</span></span>
            <a-menu-item key="8"><router-link to="/org/list">组织列表</router-link></a-menu-item>
        </a-sub-menu>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0">
        <a-icon
          class="trigger"
          :type="collapsed ? 'menu-unfold' : 'menu-fold'"
          @click="()=> collapsed = !collapsed"
        />
        <a-dropdown style="float:right;padding:0 40px;">
          <a><a-icon type="html5" />差不多先生</a>
          <a-menu slot="overlay">
            <a-menu-item>
              个人设置
            </a-menu-item>
            <a-menu-item>
              个人中心
            </a-menu-item>
            <a-menu-item>
              退出登录
            </a-menu-item>
          </a-menu>
        </a-dropdown>
      </a-layout-header>
      <a-layout-content :style="{ margin: '24px 16px', padding: '12px',  height: '100%' }">
        <router-view></router-view>
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>

<script>
// import SideMenu from '../menu/SideMenu'

export default {
    data(){
        return {
        collapsed: false,
        }
    },
    name:"GlobalLayout",
    components:{
        // SideMenu
    }
}
</script>

<style lang="less">
#components-layout-demo-custom-trigger{
  height: 100%;
}

#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color .3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
  height: 32px;
  background: rgba(255,255,255,.2);
  margin: 16px;
}
</style>
